# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=sfic
pkgver=0.1.7
pkgrel=10
pkgdesc="Small and Simple File Integrity Checker"
url="https://sfic.sourceforge.net/"
arch="all"
license="GPL-2.0-or-later"
makedepends="autoconf automake tdb-dev"
subpackages="$pkgname-doc"
source="https://downloads.sourceforge.net/sfic/sfic-$pkgver.tar.gz
	sfic-0.1.7-signal.patch
	limits.patch
	automake.patch"

prepare() {
	default_prepare
	sed -i -e 's/^        /\t/' src/Makefile.am
	aclocal
	autoconf
	automake --add-missing
}

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr
	make
}

check() {
	make check
}

package() {
	make install DESTDIR="$pkgdir"
}

sha512sums="99c0d395922e2e243dd12a4ba84222e2b5b8a6de1e3d350f4e2dc4cba9c24511a249edcef161bf9eabe3a98491dff10e67c7dd7cf80f20f09611d24c1982645e  sfic-0.1.7.tar.gz
f405b9c07160bd3db613fbf78caa5c898e2cee152e92f701783d99a310b6a50a00d313b8fba88d6308a165697fd12265739ecbfae413a39f3ab5120228efd66c  sfic-0.1.7-signal.patch
efd77cb8820bd29d6206d8de7647d16da7615c9a97382eadbe03bb54525ae430147abbe2986e3a22439b5ef7ba9feb6080d85841262a8a03f0aff53fc0a0a501  limits.patch
b1f888e231fd0079067ff5904f42b430a11ad0fc8c846cf085318811e1d828ecc2251240472d71d14c3090669123d1a0ce24c987e86b7eb3977eb3e520a969a4  automake.patch"
